<?php

require 'config/database.php';

class DBCONN extends PDO{

    public function  __construct() {
        $config = DataBase::$config;
        //var_export($config);
        $dsn = "{$config['drive']}:host={$config['host']};port={$config['port']};dbname={$config['database']}";

        parent::__construct(
            $dsn,
            $config['user'],
            $config['password'],
            array(
                PDO::ATTR_PERSISTENT=>$config['persistent'],
                PDO::ATTR_CASE=>$config['case'])
        );
    }
}